<?php

namespace app\admin\validate;
use think\Validate;

class rank extends Validate
{
    protected $rule = [
        'name'          => 'require|chsDash|unique:rank',
        'growth'        => 'require|number',
    ];

    protected $message = [
        'name.require'          => '等级名称不能为空',
        'name.chsDash'          => '等级名称不能有特殊字符',
        'name.unique'           => '等级名称已存在',
        'growth.require'        => '成长值不能为空',
        'growth.number'         => '成长值必须为数字',
    ];
}
